package com.demo2do.fms.admin.entity.export.supplier;

import com.demo2do.core.utils.DateFormatUtils;
import com.demo2do.fms.entity.supplier.common.BusinessNature;
import com.demo2do.fms.entity.supplier.common.Supplier;
import com.demo2do.fms.entity.supplier.common.SupplierInfo;
import com.demo2do.fms.entity.supplier.common.Type;

/**
 *
 * @author Ark
 *
 */
public class SupplierSheet {

	/*********** 供方信息 ************/
	
	/** 运输公司代码 */
	private String code;
	
	/** 运输公司名称 */
	private String name;
	
	/** 供方审核状态 */
	private String status;
	
	/*********** 供方基本信息 ************/
	
	/** 运输公司曾用名I(全称) */
	private String formerName;
	
	/** 运输公司曾用名II(全称) */
	private String secondFormerName;
	
	/** 董事长 */
	private String chairman;
	
	/** 总经理 */
	private String manager;
	
	/** 总经理联系电话 */
	private String managerPhone;
	
	/** 总经理Email-I */
	private String managerEmail;
	
	/** 总经理Email-II */
	private String secondManagerEmail;
	
	/** 公司性质 */
	private String companyProperty;
	
	/** 成立年月 */
	private String yearFounded;
	
	/** 注册资金(万元) */
	private String registerCapital;
	
	/** 注册地 */
	private String registerAddress;
	
	/** 联系地址 */
	private String contactAddress;
	
	/** 体系文件 */
	private String standardDocument;
	
	/** 体系文件有效期 */
	private String standardDocumentDate;
	
	/**
	 * 供应商简称
	 */
	private String shortName;
	
	/**
	 * 公司类型
	 */
	private Type type;
		
	/**
	 * 业务性质
	 */
	private BusinessNature businessNature;
	
	private String businessTypeDescription;
	
	private Supplier supplier;
	/**
	 * The default constructor
	 */
	public SupplierSheet() {
	}
	
	/**
	 * @param supplier
	 * @param supplierInfo
	 */
	public SupplierSheet(Supplier supplier, SupplierInfo supplierInfo) {
		
		this.code = supplier.getCode();
		this.name = supplier.getName();
		this.status = supplier.getStatus().getDescription();
		
		this.formerName = supplierInfo.getFormerName();
		this.secondFormerName = supplierInfo.getSecondFormerName();
		this.chairman = supplierInfo.getChairman();
		this.manager = supplierInfo.getManager();
		this.managerPhone = supplierInfo.getManagerPhone();
		this.managerEmail= supplierInfo.getManagerEmail();
		this.secondManagerEmail = supplierInfo.getSecondManagerEmail();
		this.companyProperty = supplierInfo.getCompanyDescription();
		this.yearFounded = supplierInfo.getYearFounded() != null ? DateFormatUtils.format(supplierInfo.getYearFounded(), "yyyy-MM") : null;
		this.registerCapital = supplierInfo.getRegisterCapital();
		this.registerAddress = supplierInfo.getRegisterAddress();
		this.contactAddress = supplierInfo.getContactAddress();
		this.standardDocument = supplierInfo.getStandardDocumentString();
		this.standardDocumentDate = supplierInfo.getStandardDocumentDate() != null ? DateFormatUtils.format(supplierInfo.getStandardDocumentDate(), "yyyy-MM") : null;
		this.shortName = supplier.getShortName();
		this.type = supplier.getType();
		this.businessNature = supplier.getBusinessNature();
		this.businessTypeDescription = supplier.getBusinessTypeDescription();
		
		this.supplier = supplier;
	}

	/**
	 * @return the code
	 */
	public String getCode() {
		return code;
	}

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}
	
	/**
	 * @return
	 */
	public String getStatus() {
        return status;
    }

	/**
	 * @return the formerName
	 */
	public String getFormerName() {
		return formerName;
	}

	/**
	 * @return the secondFormerName
	 */
	public String getSecondFormerName() {
		return secondFormerName;
	}

	/**
	 * @return the chairman
	 */
	public String getChairman() {
		return chairman;
	}

	/**
	 * @return the manager
	 */
	public String getManager() {
		return manager;
	}

	/**
	 * @return the managerPhone
	 */
	public String getManagerPhone() {
		return managerPhone;
	}

	/**
	 * @return the managerEmail
	 */
	public String getManagerEmail() {
		return managerEmail;
	}

	/**
	 * @return the secondManagerEmail
	 */
	public String getSecondManagerEmail() {
		return secondManagerEmail;
	}

	/**
	 * @return the companyProperty
	 */
	public String getCompanyProperty() {
		return companyProperty;
	}

	/**
	 * @return the yearFounded
	 */
	public String getYearFounded() {
		return yearFounded;
	}

	/**
	 * @return the registerCapital
	 */
	public String getRegisterCapital() {
		return registerCapital;
	}

	/**
	 * @return the registerAddress
	 */
	public String getRegisterAddress() {
		return registerAddress;
	}

	/**
	 * @return the contactAddress
	 */
	public String getContactAddress() {
		return contactAddress;
	}

	/**
	 * @return the standardDocument
	 */
	public String getStandardDocument() {
		return standardDocument;
	}

	/**
	 * @return the standardDocumentDate
	 */
	public String getStandardDocumentDate() {
		return standardDocumentDate;
	}

	/**
	 * @param code the code to set
	 */
	public void setCode(String code) {
		this.code = code;
	}

	/**
	 * @param name the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}
	
	/**
	 * @param status
	 */
	public void setStatus(String status) {
        this.status = status;
    }

	/**
	 * @param formerName the formerName to set
	 */
	public void setFormerName(String formerName) {
		this.formerName = formerName;
	}

	/**
	 * @param secondFormerName the secondFormerName to set
	 */
	public void setSecondFormerName(String secondFormerName) {
		this.secondFormerName = secondFormerName;
	}

	/**
	 * @param chairman the chairman to set
	 */
	public void setChairman(String chairman) {
		this.chairman = chairman;
	}

	/**
	 * @param manager the manager to set
	 */
	public void setManager(String manager) {
		this.manager = manager;
	}

	/**
	 * @param managerPhone the managerPhone to set
	 */
	public void setManagerPhone(String managerPhone) {
		this.managerPhone = managerPhone;
	}

	/**
	 * @param managerEmail the managerEmail to set
	 */
	public void setManagerEmail(String managerEmail) {
		this.managerEmail = managerEmail;
	}

	/**
	 * @param secondManagerEmail the secondManagerEmail to set
	 */
	public void setSecondManagerEmail(String secondManagerEmail) {
		this.secondManagerEmail = secondManagerEmail;
	}

	/**
	 * @param companyProperty the companyProperty to set
	 */
	public void setCompanyProperty(String companyProperty) {
		this.companyProperty = companyProperty;
	}

	/**
	 * @param yearFounded the yearFounded to set
	 */
	public void setYearFounded(String yearFounded) {
		this.yearFounded = yearFounded;
	}

	/**
	 * @param registerCapital the registerCapital to set
	 */
	public void setRegisterCapital(String registerCapital) {
		this.registerCapital = registerCapital;
	}

	/**
	 * @param registerAddress the registerAddress to set
	 */
	public void setRegisterAddress(String registerAddress) {
		this.registerAddress = registerAddress;
	}

	/**
	 * @param contactAddress the contactAddress to set
	 */
	public void setContactAddress(String contactAddress) {
		this.contactAddress = contactAddress;
	}

	/**
	 * @param standardDocument the standardDocument to set
	 */
	public void setStandardDocument(String standardDocument) {
		this.standardDocument = standardDocument;
	}

	/**
	 * @param standardDocumentDate the standardDocumentDate to set
	 */
	public void setStandardDocumentDate(String standardDocumentDate) {
		this.standardDocumentDate = standardDocumentDate;
	}

    /**
     * @return the shortName
     */
    public String getShortName() {
        return shortName;
    }

    /**
     * @param shortName the shortName to set
     */
    public void setShortName(String shortName) {
        this.shortName = shortName;
    }

    /**
     * @return the type
     */
    public Type getType() {
        return type;
    }

    /**
     * @param type the type to set
     */
    public void setType(Type type) {
        this.type = type;
    }

    /**
     * @return the businessNature
     */
    public BusinessNature getBusinessNature() {
        return businessNature;
    }

    /**
     * @param businessNature the businessNature to set
     */
    public void setBusinessNature(BusinessNature businessNature) {
        this.businessNature = businessNature;
    }

    /**
     * @return the businessTypeDescription
     */
    public String getBusinessTypeDescription() {
        return businessTypeDescription;
    }

    /**
     * @param businessTypeDescription the businessTypeDescription to set
     */
    public void setBusinessTypeDescription(String businessTypeDescription) {
        this.businessTypeDescription = businessTypeDescription;
    }

    /**
     * @return the supplier
     */
    public Supplier getSupplier() {
        return supplier;
    }

    /**
     * @param supplier the supplier to set
     */
    public void setSupplier(Supplier supplier) {
        this.supplier = supplier;
    }

}
